package com.learn.initbean.Initializingbean;

import org.springframework.beans.factory.InitializingBean;

/**
 * @author daify
 * @date 2019-03-23 13:54
 */
public class InitializingBeanTest implements InitializingBean {

    private String name;

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("InitializingBeanTest initializing...");
        this.name = "类中创建的bean";
    }

    public void testInit() {
        this.name = "testInit中创建的bean";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
